<?php

namespace app\services\notice;

use app\dao\notice\NoticeOtherDao;
use app\exceptions\AdminException;
use app\services\BaseService;

class NoticeOtherService extends BaseService
{

    public function __construct(NoticeOtherDao  $dao)
    {
        $this ->dao = $dao;
    }

    public function index(array $where)
    {
        return $this -> dao -> index($where);
    }

    public function create(array $where)
    {
        return $this ->dao ->create($where);
    }

    public function update(array $where)
    {
        return $this ->dao -> updateDao($where);
    }

    public function delete(array $where)
    {
        return $this ->dao ->deleteDao($where);
    }

    public function search(array $where)
    {
        return $this ->dao -> searchDao($where);
    }


    //------------------------------------api-----------------------------------------------
    /*
     * '更新公告','使用帮助','消息通知' 目录
     */
    public function gerInformation(array $where){
       return $this->dao->getInformaiton($where);

    }
    /*
     * '更新公告','使用帮助','消息通知' 内容
     */
    public function getcontent(array $where){
       return  $this->dao->getContent($where);

//        if ($data){
//            return $data;
//        }else{
//            $other =  $this->dao->insertOther();
//            if ($other){
//                return $other;
//            }else{
//                throw new AdminException('保存失败');
//            }
//        }
    }
}